package com.mrduan.calculator.ui.calculator.base;

import android.content.Context;
import android.widget.BaseAdapter;

import java.util.List;

/**
 * Created by snoopy on 2018/4/10.
 */

public abstract class CalculatorAdapter extends BaseAdapter {
    public Context context;
    public List<CalculatorBean> list;

    public CalculatorAdapter(Context context,final List<CalculatorBean> list){
        this.context = context;
        this.list = list;
    }

    public void setList(List<CalculatorBean> list) {
        this.list = list;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CalculatorBean getItem(int position) {
        return list.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

}
